/**
 * 
 */
package com.dalonedrow.engine.systems.base;

/**
 * @author Donald
 */
public abstract class Interactive<IO> {
	/** the one and only instance of the <code>Interactive</code> class. */
	private static Interactive	instance;
	/**
	 * Gives access to the singleton instance of {@link Interactive}.
	 * @return {@link ChivSorcInteractive}
	 */
	public static Interactive getInstance() {
		return Interactive.instance;
	}
	/**
	 * Sets the singleton instance.
	 * @param i the instance to set
	 */
	protected static void setInstance(final Interactive i) {
		Interactive.instance = i;
	}
	/**
	 * Releases the IO and all resources.
	 * @param io the IO
	 */
	public abstract void releaseIO(final IO io);
	public abstract void addAnimation(final int id, final int animId)
			throws Exception;
	/**
	 * Gets a new interactive object.
	 * @return {@link IO}
	 */
	public abstract IO getNewIO();
	/**
	 * Gets a {@link IO} by its reference id.
	 * @param id the reference id
	 * @return {@link IO}
	 * @throws Exception if the object does not exist
	 */
	public abstract IO getIO(final int id) throws Exception;
	/**
	 * Gets the number of interactive objects in existence.
	 * @return <code>int</code>
	 */
	public abstract int getNumberIOs();
	/**
	 * Determines if the {@link Interactive} has an interactive object by a
	 * specific id.
	 * @param id the id
	 * @return true if an interactive object by that id has been stored already;
	 *         false otherwise
	 */
	public abstract boolean hasIO(final int id);
}
